// 定义key
const tokenKey = 'top-line-token'

// 保存
const saveToken = tokenObj => {
    window.localStorage.setItem(tokenKey, JSON.stringify(tokenObj))
}
// 删除
const removeToken = () => {
    window.localStorage.removeItem(tokenKey)
}
// 获取
const getToken = () => {
    return JSON.parse(window.localStorage.getItem(tokenKey))
}

export { saveToken, removeToken, getToken }
